//
//  GTFurnaceHostApiV2Impl.swift
//  lib_furnace
//
//  Created by Shper on 2024/3/28.
//

import Foundation

class GTFurnaceHostApiV2Impl: GTFurnaceHostApiV2 {
    
    func addStartPageName(routeName: String?) throws {
        guard let routeNameTemp = routeName else {
            return
        }
        
        if (GTFlutter.shared.pageStartedList.contains(routeNameTemp)) {
            GTFlutter.shared.removePageStartedList(routerName: routeNameTemp)
        }
        GTFlutter.shared.pageStartedList.append(routeNameTemp)
    }
    
    func removeStartPage(routeName: String?) throws {
        guard let routeNameTemp = routeName else {
            return
        }

        GTFlutter.shared.removePageStartedList(routerName: routeNameTemp)
    }
}
